This article mainly introduces about PHP according to latitude and longitude sorting, according to latitude and longitude to filter the distance segment, has a certain reference value, now share to everyone, the need for friends can refer to
SQL statements: Select Location.* from (select *,round (6378.138*2*asin (sqrt () (Pow () (Sin (36.668530*pi ()/180-px_lat*pi ()/180)/2), 2) +cos (36.668530*pi ()/180) *cos (Px_lat*pi ()/180) * POW (Sin ((117.020359*pi ()/180-px_lon*pi ()/180)/2), 2)) (*1000
great iPhone product, 2/3 of mobile phone terminals, Web browsing from iPhone or iPod.
At, Beijing time, huzzah software came. Using iPhone accessories and using the iPhone as a guitar amplifier may seem boring to everyone. Now, 90% of the people present need to be patient, haha.
The Zipcar software, which uses the iPhone to remotely monitor your car and learn about its location and embedded Google Maps, is introduced at am Beijing time. You
']; $ret [' lng '] = $data [' result '] [' location '] [' LNG ']; echo Json_encode ($ret); }
2. If the store is within 1000 meters, we need to calculate the latitude and longitude range within 1000 meters.
/* * Calculate latitude and longitude range * $lat latitudes * $lon Longitude * $raidus radius (m) */function Getaround ($lat, $ Lon, $raidus) {$PI = 3.14159265; $EARTH _radius = 6378137; $RAD = $PI/180.0;
); $ data = json_decode ($ data, true); $ ret ['lat'] = $ data ['result'] ['location'] ['lat']; $ ret ['lng '] = $ data ['result'] ['location'] ['lng']; echo json_encode ($ ret );}
2. if the store is within 1000, we need to calculate the latitude and longitude range within 1000.
/** Calculate the latitude and longitude range * $ lat latitude * $ lon longitude * $ raidus radius (meters) */function getAround ($ lat, $ lon, $ raidus) {$ PI = 3.14159265
include competitor information, because the customers think that the Agency will do the investigation, but if you can provide the relevant information, it can save the time and money they spent doing this. You also want to see the first draft as soon as possible ."
Clearly defining the audience of your products and typical customers can also help speed up the pace. "Your target audience is a broad concept. They are the target audience of your products or services. If
)/10000; String Distancestr= distance+ ""; Distancestr=Distancestr. SUBSTRING (0, Distancestr.indexof ("."))); returnDistancestr; } /*** Get the latitude and longitude values within a certain distance of the current user * unit meters return Minlat * min Longitude minlng * min latitude Maxlat * Maximum longitude maxlng * Maximum latitude Minl at*/ Public Staticmap Getaround (string latstr, String lngstr, String raidus) {map map=NewHashMap
querying latitude and longitude by postal code.Package com.lt.xiaoliao.util;public class Latlonutil {Private static final Double PI = 3.14159265;Private static final Double Earth_radius = 6378137;Private static final Double RAD = math.pi/180.0;/*** @param raidus Unit Meter* Specify the location (latitude and longitude LNG lat) and search radius (r) to search for data in the specified range* If the accuracy requirement is not very high, you can calculate the latitude and longitude range accordin
To travel in the United States, renting a car should be a good choice.There are domestic rental car rentals available, or rent a car directly in Alamo,enterprise,national, USA. These are all a family. Affiliated to Https://en.wikipedia.org/wiki/Enterprise_HoldingsHertz,avis,zipcar is also an American car rental company.Vehicle information can be obtained by license plate or VIN on the following website.http://www.autocheck.com/vehiclehistory/autocheck
when the left and right sides are generated. Only the accuracy changes, and the latitude remains unchanged.
Therefore, you only need to generate the upper and lower latitudes to ensure the accuracy of the left and right sides.
According to the article on the internet, http://digdeeply.info/archives/06152067.html this article is achieved by using PHP longitude and latitude query. The Code modified to java is as follows:
[Java] view plaincopy/*** Generate a quartile longitude and latitude centere
, etc.), the more it means that you can take advantage of the chain reaction between consumers to help you take on 90% of your marketing costs.ConclusionIn many cases, the density of consumers in the same market is a key factor in business success.Because once a market, with similar products to meet the similar needs of consumers more than a certain threshold (such as 100 people in the use of 15), the impact of consumer interaction, opinion reference will form a chain reaction, the entire market
costs may easily exceed billion dollars!
In fact, in the Internet entrepreneurship field, we often lament that many companies in Silicon Valley are more imaginative than us, such as my favorite ifttt, Airbnb, Zipcar, Twitter, Pinterest, google Glass, Siri...
This time I chatted with a group of students, such as Stanford, ucia, and Berkeley, who came out to start a business in Silicon Valley. They had an interesting point. They believe that there are
Thinkphp implements nearby queries, such as nearby people and nearby deals.First, you want to locate the latitude and longitude of the user. The client-side targeting method can be located using the Map API or with the HTML5 browser (less stable and less precise).Then, the current latitude and longitude, and the distance required to search, calculate a latitude and longitude range, this range is "nearby." An example of this "nearby" is calculated as follows:/** * * @param $latitude latitude * @p
, minimum latitude and longitude minlng, Minlat, MAXLNG, Maxlatreturns> Public Double[]Getaround (DoubleLngDoubleLatintRaidus) { //The circumference ofThe Earth is -,901miles. // -,901/ the = 69.17Miles/degreeDoubleLatitude=lat; DoubleLongitude=LNG; DoubleDegree=(24901 * 1609)/ 360.0;//the perimeter of the earth is 24901 miles.DoubleRaidusmile=Raidus; //Calculate latitude FirstDoubleDpmlat= 1 /degree; DoubleRadiuslat=Dpmlat*Raidusm
Application Scenario Description: Assume that there is a merchant table in the database, which records the basic information and coordinates of Some sellers,
In this case, how can I quickly find qualified merchants in a specified region through location in my app?
The following is the implementation of Java code:
/** Baidu map * obtains the latitude and longitude ranges of the given latitude and longitude distance from the radius ** @ Param lat latitude * @ Param Lon longitude * @ Param raidus
1. Calculate distance to maximum minimum latitude and longitude according to latitude and longitude C #
public class Latlonutil {private static double PI = 3.14159265;//pi private static double
_radius = 6378137;
private static Double RAD = math.pi/180.0;
@see//The circumference of the Earth is 24,901 miles. 24,901/360 = 69.17 miles/degree/** * @param raidus * unit: M return minlat,min
LNG,MAXLAT,MAXLNG */public static double[]
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.